package com.ruoyi.teacher.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teacher.mapper.TAssessmentMapper;
import com.ruoyi.teacher.domain.TAssessment;
import com.ruoyi.teacher.service.ITAssessmentService;

/**
 * 考核信息Service业务层处理
 * 
 * @author xiangzy
 * @date 2022-05-08
 */
@Service
public class TAssessmentServiceImpl implements ITAssessmentService 
{
    @Autowired
    private TAssessmentMapper tAssessmentMapper;

    /**
     * 查询考核信息
     * 
     * @param recordid 考核信息ID
     * @return 考核信息
     */
    @Override
    public TAssessment selectTAssessmentById(Long recordid)
    {
        return tAssessmentMapper.selectTAssessmentById(recordid);
    }

    /**
     * 查询考核信息列表
     * 
     * @param tAssessment 考核信息
     * @return 考核信息
     */
    @Override
    public List<TAssessment> selectTAssessmentList(TAssessment tAssessment)
    {
        return tAssessmentMapper.selectTAssessmentList(tAssessment);
    }

    /**
     * 新增考核信息
     * 
     * @param tAssessment 考核信息
     * @return 结果
     */
    @Override
    public int insertTAssessment(TAssessment tAssessment)
    {
        tAssessment.setCreateTime(DateUtils.getNowDate());
        return tAssessmentMapper.insertTAssessment(tAssessment);
    }

    /**
     * 修改考核信息
     * 
     * @param tAssessment 考核信息
     * @return 结果
     */
    @Override
    public int updateTAssessment(TAssessment tAssessment)
    {
        tAssessment.setUpdateTime(DateUtils.getNowDate());
        return tAssessmentMapper.updateTAssessment(tAssessment);
    }

    /**
     * 批量删除考核信息
     * 
     * @param recordids 需要删除的考核信息ID
     * @return 结果
     */
    @Override
    public int deleteTAssessmentByIds(Long[] recordids)
    {
        return tAssessmentMapper.deleteTAssessmentByIds(recordids);
    }

    /**
     * 删除考核信息信息
     * 
     * @param recordid 考核信息ID
     * @return 结果
     */
    @Override
    public int deleteTAssessmentById(Long recordid)
    {
        return tAssessmentMapper.deleteTAssessmentById(recordid);
    }
}
